Action Scripting

KoolMoves provides Flash 6 action scripting capability. A large fraction of the possible Flash 5 and 6 operators and commands are supported at this time. The question mark at the top of the editing environment lists the supported syntax. This functionality is regarded as advanced and requires knowledge of action scripting that can be obtained from books or web sites devoted to that subject.

Some Flash 4 syntax is not supported. The only valid target syntax is the dot syntax. For example, Flash 4 syntax _level0:clip and _level0/clip should be represented as _level0.clip.

There are a number of action script examples in the Examples folder. actionscript-toolbox.com, www.actionscripts.org, and www.macromedia.com/support/flash/action_scripts.html are good sources of information. Definitive Guide to ActionScript by Colin Moock is one of the best books on the subject. Another approach is to learn javascript because Flash action script is basically javascript. This is a good guide to javascript: www.oreillynet.com/pub/a/javascript/2001/ 12/07/action.html

Note that if you use gotoAndPlay or gotoAndStop actions and if you use a KoolMoves' preloader, 2 frames are automatically added by KoolMoves at the beginning of the movie.

Also note that in gotoAndPlay, the first frame of the movie is 1 not 0. It is less error prone to name frames and use frame names in goto actions rather than frame numbers.

Stop movie action should not be placed on the first frame. In fact there is error checking to prevent this. A stop action on the first frame is often ignored by the Flash player.

With Flash 6, dynamic text has both an instance and a variable name in the Flash authoring tool. Object attributes like 'text' and '_x' are associated with the instance name which in KoolMoves is the name of the object, e.g., txt1. The variable name is used for backward compatibility for assignment statements such as = "hello". The KoolMoves interface does not support both an instance name and a variable name because of the confusion associated with having two names for basically the same thing. KoolMoves automatically associates a variable name with all Flash 6 dynamic text objects as the instance name plus "var". For example, if the name of a dynamic text object is txt1, when exported as Flash 6 the variable name is txt1var and the instance name is txt1. For a Flash 4 and 5 exported dynamic text object named txt1, the variable name is still txt1. Sorry about this confusion but this seems like the simplest way to handle the situation.

These statements are valid for Flash 6 export:
        txt1var = "hello";
        txt1.text = "hello";
        txt1._x = 200;

These statements are valid for Flash 4/5 export:
        txt1 = "hello";
        txt1._x = 200;